package com.whut.customer.controller;


import com.whut.common.util.R;
import com.whut.customer.base.BaseController;
import com.whut.customer.entity.Plane;
import com.whut.customer.service.IPlaneListService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 机型表 前端控制器
 * </p>
 *
 * @author author
 * @since 2021-04-12
 */
@RestController
@CrossOrigin
@RequestMapping("/planeList")
public class PlaneListController extends BaseController {
    @Autowired
    IPlaneListService iPlaneListService;

    @ApiOperation("辨识机型")
    @PostMapping("/findPlane")
    public R<Plane> findPlane(float left, float right) {

        return R.ok(iPlaneListService.findPlane(left, right));

    }
}
